
function startCourse()

	

{

	// check to see if cookies is enabled, otherwise, this won't work

	if( typeof sessionStorage === "undefined" || sessionStorage.disabled )
	{
		alert( "Enable cookies for this course to work properly." );

	}

	else

	{

		// if it is enabled, checked to see if this course was started
		// if it was not able to retrieve, the key "course_started", then
	// then this is the first time we are running the course
        if( !sessionStorage.getItem( "course_started" ) )

        {

        

            sessionStorage.clear();

    	sessionStorage.setItem( "course_started", "1" );

    	sessionStorage.setItem( "moon", "0" );

    	sessionStorage.setItem( "moons", "0" );

    	sessionStorage.setItem( "moonph", "0" );

    	sessionStorage.setItem( "eclises", "0" );

        }

	}

}

function visitmoon()

{

sessionStorage.setItem( "moon", "visited" );

showTest();


}

function visitmoons()

{

sessionStorage.setItem( "moons", "visited" );


showtest();

 
}





function visitmoonph()

{
sessionStorage.setItem( "moonph", "visited" );

showtest();

}







function visiteclises()

{

sessionStorage.setItem( "eclises", "visited" );


showtest();

}






function showtest()

{


var moonVisited = sessionStorage.getItem( "moon" );


var moonsVisited = sessionStorage.getItem( "moons" );


var moonphVisited = sessionStorage.getItem( "moonph" );

var eclisesVisited = sessionStorage.getItem( "eclises" );
	


	if( moonVisited = "visited" && moonsVisited == "visited" && moonphVisited == "visited" && eclisesVisited == "visited" )



	{

	document.getElementById( "test-link" ).style.display = "inline";

	

	}



} 

